<template>
    <view class="container">
        购物车页面
    </view>

</template>

<script>

import { GoodsCarList , GoodsCarEdit } from '@/api/http';
const app = getApp();
export default {
    data () {
        return {
            keyword: '',
            form:{	
                "pageNum": 1,
                "pageSize": 1000,
                "userId":undefined
            },
            listArr:[],
            total:0
        }
    },
    onShow () {

        app.laterToken(bool => {
            this.initCar()
          
        })

    },
    onLoad (option) {
      
    },
    methods: {
        initCar(){

            let userId = app.globalData.userId

            if (userId) {

                this.form.userId = userId

                GoodsCarList( this.form ).then( res =>{

                    if(res.code == 200){

                        this.listArr = res.data

                        this.total =  res.total
                    }

                })

            }
            
        },
    }
}
</script>

<style scoped lang="scss">

</style>
